from homework.src.day10.survivor import Survivor, Layer, Doctor, Gardener
from homework.src.day10.supervise import Supervise, Jack


class Game:
    def __init__(self, survivor_list: list[Survivor], supervise: Supervise):
        self.survivors = survivor_list
        self.supervise = supervise
        print("游戏初始化完成")

    def process(self):
        garden_girl = self.survivors[0]
        self.supervise.beat(garden_girl)
        garden_girl.run()
        doctor = self.survivors[1]
        self.supervise.beat(doctor)
        doctor.skill()
        self.supervise.beat(doctor)
        jack.skill(doctor)

    def process2(self):
        garden_girl = self.survivors[0]
        garden_girl.skill()
        self.supervise.beat(garden_girl)
        self.supervise.beat(garden_girl)
        self.supervise.beat(garden_girl)


if __name__ == '__main__':
    layer = Layer("律师", 1, 0)
    layer2 = Layer("律师", 1, 0)
    doctor = Doctor("医生", 1, 0)
    garden_girl = Gardener("园丁", 1, 0)
    jack = Jack("杰克")
    game = Game([garden_girl, doctor, layer, layer2], jack)
    # game.process()
    game.process2()
